package com.glela.live.service.impl;

import com.glela.live.mapper.LiveRecordMapper;
import com.glela.live.model.LiveRecord;
import com.glela.live.service.LiveRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LiveRecordServiceImpl implements LiveRecordService{

    @Autowired
    private LiveRecordMapper liveRecordMapper;

    @Override
    public int add(LiveRecord liveRecord) {
        return liveRecordMapper.add(liveRecord);
    }

    @Override
    public int update(String fileUrl, Long liveUserId) {
        return liveRecordMapper.update(liveUserId,fileUrl);
    }

    @Override
    public LiveRecord getLastRecord(Long liveUserId) {
        return liveRecordMapper.getLastRecord(liveUserId);
    }
}
